import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

import Toast from './components/Toast.vue';
import Modal from './components/Modal.vue';

Vue.config.productionTip = false;
Vue.component('Toast', Toast);
Vue.component('Modal', Modal);

Vue.mixin({
  methods: {
    msg(msg) {
      this.$store.dispatch('toast', {
        value: true,
        msg,
      });
    },
  },
});

export default new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app');
